﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="AccountManager.ascx.cs"
    Inherits="TMDT_Nhom1A.UserControl_Admin.AccountManager" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="tk" %>
<%--<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>--%>
<tk:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
</tk:ToolkitScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
        <div class="module_round_box_inner">
            <div class="module_round_box_inner2">
                <div class="s5_mod_h3_1">
                    <div class="s5_mod_h3_2">
                        <h3 class="s5_mod_h3">
                            <span class="s5_h3_first">Quản Lý Tài Khoản</span>
                        </h3>
                    </div>
                </div>
                <!-- content -->
                <br />
                <br />
                <div class="label_register">
                    Tìm Theo Username:
                </div>
                <div class="textbox_register">
                    <asp:TextBox CssClass="tb_2" Width="200px" ID="tbUsername" runat="server"></asp:TextBox>
                    <asp:Button CssClass="button" ID="btTimKiem" runat="server" Text="Tìm Kiếm" OnClick="btTimKiem_Click" />
                </div>
                <br />
                <asp:GridView ID="gvAccountManager" runat="server" Width="100%" AutoGenerateColumns="False"
                    OnRowDataBound="gvAccountManager_RowDataBound" AllowPaging="True" OnPageIndexChanging="gvAccountManager_PageIndexChanging"
                    PageSize="10" OnRowCommand="gvAccountManager_RowCommand">
                    <Columns>
                        <asp:BoundField DataField="Username" HeaderText="Username">
                            <ItemStyle Width="225px" HorizontalAlign="Center" />
                        </asp:BoundField>
                        <asp:BoundField DataField="CreatedDate" HeaderText="Ngày Tạo">
                            <ItemStyle Width="225px" HorizontalAlign="Center" />
                        </asp:BoundField>
                        <asp:BoundField DataField="LasthereDate" HeaderText="Ngày Đăng Nhập Gần Nhất">
                            <ItemStyle Width="225px" HorizontalAlign="Center" />
                        </asp:BoundField>
                        <asp:TemplateField HeaderText="Trạng Thái">
                            <ItemTemplate>
                                <asp:Label ID="lbStatus" Visible="false" runat="server" Text='<%# Eval("Status")%>'></asp:Label>
                                <asp:Image ID="ImgUserStatus" Height="25px" Width="25px" runat="server" />
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Kích hoạt">
                            <ItemTemplate>
                                <asp:Label ID="lbActivate" Visible="false" runat="server" Text='<%# Eval("Activate") %>'></asp:Label>
                                <asp:Image ID="ImgActivateStatus" runat="server" />
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Chi Tiết">
                            <ItemTemplate>
                                <asp:ImageButton Height="30px" Width="30px" ID="btViewDetail" CommandName="ViewDetail"
                                    CommandArgument='<%# Eval("UserID") %>' ToolTip="Xem Chi tiết" ImageUrl="~/images/xem-chi-tiet.png"
                                    runat="server" />
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Chỉnh Sửa">
                            <ItemTemplate>
                                <asp:ImageButton Height="30px" Width="30px" ID="btEditDetail" CommandName="EditDetail"
                                    CommandArgument='<%# Eval("UserID") %>' ToolTip="Chỉnh Sửa" ImageUrl="~/images/edit.png"
                                    runat="server" />
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                    </Columns>
                    <HeaderStyle CssClass="HeaderGrid" />
                </asp:GridView>
                <br />
                <br />
                <asp:Label ID="LbThongBao" runat="server" Text=""></asp:Label>
                <asp:UpdateProgress ID="UpdateProgress1" runat="server">
                    <ProgressTemplate>
                        Đang lấy dữ liệu từ server...
                        <img src="../images/ajax-loader.gif" />&nbsp;&nbsp;
                    </ProgressTemplate>
                </asp:UpdateProgress>
                <br />
                <br />
                <!-- End content -->
                <br />
                <br />
            </div>
        </div>
        <div class="module_round_box_inner">
            <div class="module_round_box_inner2">
                <div class="s5_mod_h3_1">
                    <div class="s5_mod_h3_2">
                        <h3 class="s5_mod_h3">
                            <span class="s5_h3_first">Chi Tiết</span>
                        </h3>
                    </div>
                </div>
                <asp:DataList ID="DtlUserInfo" Width="680px" runat="server" OnItemCommand="DtlUserInfo_ItemCommand"
                    OnItemDataBound="DtlUserInfo_ItemDataBound">
                    <ItemTemplate>
                        <div class="Label_AccountManager">
                            <asp:Label ID="lbStatus" Visible="false" runat="server" Text='<%# Eval("Status")%>'></asp:Label>
                        </div>
                        <div>
                            <asp:DropDownList ID="drlStatus" Visible="false" runat="server">
                            </asp:DropDownList>
                        </div>
                        <div class="Label_AccountManager">
                            <asp:Label ID="lbActivate" Visible="false" runat="server" Text='<%# Eval("Activate")%>'></asp:Label>
                        </div>
                        <div>
                            <asp:DropDownList ID="drlActivate" Visible="false" runat="server">
                            </asp:DropDownList>
                        </div>
                        <div class="Label_AccountManager">
                            <asp:Label ID="Label1" runat="server" Text="Tên Công Ty:"></asp:Label>
                        </div>
                        <div>
                            <asp:Label ID="Label11" runat="server" Text='<%# Eval("AddressCompany")%>'></asp:Label>
                        </div>
                        <div class="Label_AccountManager">
                            <asp:Label CssClass="Label_AccountManager" ID="Label10" runat="server" Text="email:"></asp:Label>
                        </div>
                        <div>
                            <asp:Label ID="Label12" runat="server" Text='<%# Eval("Email")%>'></asp:Label>
                        </div>
                        <br />
                        <div class="Label_AccountManager">
                            <asp:Label CssClass="Label_AccountManager" ID="Label3" runat="server" Text="Mã Số Thuế:"></asp:Label>
                        </div>
                        <div>
                            <asp:Label ID="Label14" runat="server" Text='<%# Eval("TaxCode")%>'></asp:Label>
                        </div>
                        <div class="Label_AccountManager">
                            <asp:Label CssClass="Label_AccountManager" ID="Label4" runat="server" Text="Họ Tên:"></asp:Label>
                        </div>
                        <div>
                            <asp:Label ID="Label15" runat="server" Text='<%# Eval("NamePresentation")%>'></asp:Label>
                        </div>
                        <div class="Label_AccountManager">
                            <asp:Label CssClass="Label_AccountManager" ID="Label5" runat="server" Text="Vai Trò:"></asp:Label>
                        </div>
                        <div>
                            <asp:Label ID="Label16" runat="server" Text='<%# Eval("Role")%>'></asp:Label>
                        </div>
                        <div class="Label_AccountManager">
                            <asp:Label CssClass="Label_AccountManager" ID="Label6" runat="server" Text="Tên Công Ty:"></asp:Label>
                        </div>
                        <div>
                            <asp:Label ID="Label17" runat="server" Text='<%# Eval("NameCompany")%>'></asp:Label>
                        </div>
                        <div class="Label_AccountManager">
                            <asp:Label CssClass="Label_AccountManager" ID="Label7" runat="server" Text="Điện Thoại:"></asp:Label>
                        </div>
                        <div>
                            <asp:Label ID="Label18" runat="server" Text='<%# Eval("Phone")%>'></asp:Label>
                        </div>
                        <div class="Label_AccountManager">
                            <asp:Label CssClass="Label_AccountManager" ID="Label8" runat="server" Text="Điện Thoại Di Động:"></asp:Label>
                        </div>
                        <div>
                            <asp:Label ID="Label19" runat="server" Text='<%# Eval("Mobile")%>'></asp:Label>
                        </div>
                        <div class="Label_AccountManager">
                            <asp:Label CssClass="Label_AccountManager" ID="Label9" runat="server" Text="Ngày Đăng Kí:"></asp:Label>
                        </div>
                        <div>
                            <asp:Label ID="Label20" runat="server" Text='<%# Eval("DateRegistry")%>'></asp:Label>
                        </div>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <div class="Label_AccountManager">
                            <asp:Label ID="Label23" runat="server" Text="Trạng Thái:"></asp:Label>
                            <asp:Label ID="lbStatus" Visible="false" runat="server" Text='<%# Eval("Status")%>'></asp:Label>
                        </div>
                        <div>
                            <asp:DropDownList CssClass="tb_2" Width="300px" ID="drlStatus" runat="server">
                            </asp:DropDownList>
                        </div>
                        <div class="Label_AccountManager">
                            <asp:Label ID="Label24" runat="server" Text="Kích Hoạt:"></asp:Label>
                            <asp:Label ID="lbActivate" Visible="false" runat="server" Text='<%# Eval("Activate")%>'></asp:Label>
                        </div>
                        <div>
                            <asp:DropDownList CssClass="tb_2" Width="300px" ID="drlActivate" runat="server">
                            </asp:DropDownList>
                        </div>
                        <div class="Label_AccountManager">
                            <asp:Label ID="Label1" runat="server" Text="Tên Công Ty:"></asp:Label>
                        </div>
                        <div>
                            <asp:TextBox CssClass="tb_2" ID="tbAddressCompany" Width="300px" Text='<%# Eval("AddressCompany")%>'
                                runat="server"></asp:TextBox>
                        </div>
                        <div class="Label_AccountManager">
                            <asp:Label CssClass="Label_AccountManager" ID="Label10" runat="server" Text="email:"></asp:Label>
                        </div>
                        <div>
                            <asp:TextBox CssClass="tb_2" ID="tbEmail" Width="300px" Text='<%# Eval("Email")%>'
                                runat="server"></asp:TextBox>
                        </div>
                        <br />
                        <div class="Label_AccountManager">
                            <asp:Label CssClass="Label_AccountManager" ID="Label3" runat="server" Text="Mã Số Thuế:"></asp:Label>
                        </div>
                        <div>
                            <asp:TextBox CssClass="tb_2" ID="tbTaxCode" Width="300px" Text='<%# Eval("TaxCode")%>'
                                runat="server"></asp:TextBox>
                        </div>
                        <div class="Label_AccountManager">
                            <asp:Label CssClass="Label_AccountManager" ID="Label4" runat="server" Text="Họ Tên:"></asp:Label>
                        </div>
                        <div>
                            <asp:TextBox CssClass="tb_2" ID="tbNamePresentation" Width="300px" Text='<%# Eval("NamePresentation")%>'
                                runat="server"></asp:TextBox>
                        </div>
                        <div class="Label_AccountManager">
                            <asp:Label CssClass="Label_AccountManager" ID="Label9" runat="server" Text="Ngày Đăng Kí:"></asp:Label>
                        </div>
                        <div>
                            <asp:TextBox CssClass="tb_2" ID="tbDateRegistry" Width="300px" Text='<%# Eval("DateRegistry")%>'
                                runat="server"></asp:TextBox>
                            <tk:CalendarExtender ID="CalendarExtender1" TargetControlID="tbDateRegistry" runat="server">
                            </tk:CalendarExtender>
                        </div>
                        <div class="Label_AccountManager">
                            <asp:Label CssClass="Label_AccountManager" ID="Label5" runat="server" Text="Vai Trò:"></asp:Label>
                        </div>
                        <div>
                            <asp:TextBox CssClass="tb_2" ID="tbRole" Width="300px" Text='<%# Eval("Role")%>'
                                runat="server"></asp:TextBox>
                        </div>
                        <div class="Label_AccountManager">
                            <asp:Label CssClass="Label_AccountManager" ID="Label6" runat="server" Text="Tên Công Ty:"></asp:Label>
                        </div>
                        <div>
                            <asp:TextBox CssClass="tb_2" ID="tbNameCompany" Width="300px" Text='<%# Eval("NameCompany")%>'
                                runat="server"></asp:TextBox>
                        </div>
                        <div class="Label_AccountManager">
                            <asp:Label CssClass="Label_AccountManager" ID="Label7" runat="server" Text="Điện Thoại:"></asp:Label>
                        </div>
                        <div>
                            <asp:TextBox CssClass="tb_2" ID="tbPhone" Width="300px" Text='<%# Eval("Phone")%>'
                                runat="server"></asp:TextBox>
                        </div>
                        <div class="Label_AccountManager">
                            <asp:Label CssClass="Label_AccountManager" ID="Label8" runat="server" Text="Điện Thoại Di Động:"></asp:Label>
                        </div>
                        <div>
                            <asp:TextBox CssClass="tb_2" ID="tbMobile" Width="300px" Text='<%# Eval("Mobile")%>'
                                runat="server"></asp:TextBox>
                        </div>
                        <br />
                        <div style="margin-left: 170px">
                            <asp:ImageButton CommandName="Update" CommandArgument='<%# Eval("UserID") %>' ID="btUpdate"
                                Height="30" Width="30" ImageUrl="~/images/Edit-Document-icon.png" runat="server"
                                ToolTip="Cập nhật" />
                            <asp:ImageButton CommandName="Cancel" CommandArgument='<%# Eval("UserID") %>' ID="btCancel"
                                Height="30" Width="30" ImageUrl="~/images/delete-icon.png" runat="server" ToolTip="Cancel" />
                        </div>
                    </EditItemTemplate>
                </asp:DataList>
            </div>
        </div>
    </ContentTemplate>
</asp:UpdatePanel>
